package com.ruoyi.asset.lamp.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.asset.lamp.domain.LampMaintenance;
import com.ruoyi.asset.lamp.domain.bo.*;
import com.ruoyi.asset.lamp.domain.vo.LampMaintenanceVo;
import com.ruoyi.common.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * @author 12276
 */
public interface LampMaintenanceMapper extends BaseMapperPlus<LampMaintenanceMapper, LampMaintenance, LampMaintenanceVo> {

    /**
     * 删除管养范围
     */
    int logicDeleteLampMaintenance(@Param("idsSet") Set<Long> idsSet);

    /**
     *  分页查询路灯养护管理范围
     */
    Page<LampMaintenanceVo> selectLampMaintenancePage(IPage<LampMaintenanceVo> page, @Param("searchBo") LampMaintenanceBo searchBo);

    /**
     * 查询路灯养护管理范围
     */
    List<LampMaintenanceVo> exportLampMaintenance(@Param("searchBo") LampMaintenanceBo searchBo);

    /**
     * 统计灯光数
     * @return
     */
    Integer selectLampCount();

    List<LampTypeBo> selectLampCommunityCount(@Param("community") String community);

    List<LampTypeBo> selectByCommunityAndDateCount(@Param("community") String community, @Param("date")String date);

    Integer selectLampCountByCommunity(@Param("date") String date,@Param("community") String community);

    int selectSumDate(@Param("date") String date);
}
